﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CozeDomain.Base;
using FreeSql.DataAnnotations;

namespace CozeDomain.Entities
{
    [Table(Name = "Conversation")]
    [Description("用户会话历史")]
    public class ConversationEntity : BaseTenantsEntity
    {
        /// <summary>
        /// 所属用户ID
        /// </summary>
        [Column(DbType = "varchar", StringLength = 36, IsNullable = false)]
        [Description("所属用户ID")]
        public string? UserId { get; set; }

        /// <summary>
        /// 项目ID
        /// </summary>
        [Column(DbType = "varchar", StringLength = 36, IsNullable = false)]
        [Description("项目ID")]
        public string? ProjectId { get; set; }

        /// <summary>
        /// 问题标题
        /// </summary>
        [Column(DbType = "varchar", StringLength = 200, IsNullable = false)]
        [Description("问题标题")]
        public string? Title { get; set; }

        /// <summary>
        /// 会话的唯一标识
        /// </summary>
        [Column(DbType = "varchar", StringLength = 30, IsNullable = false)]
        [Description("会话的唯一标识")]
        public string? ConversationId { get; set; }

        /// <summary>
        /// 发起对话接口 Response 中 Chat 事件的 data.id 字段即为 Chat ID
        /// </summary>
        [Column(DbType = "varchar", StringLength = 30, IsNullable = false)]
        [Description("发起对话接口 Response 中 Chat 事件的 data.id 字段即为 Chat ID")]
        public string? ChatId { get; set; }
    }
}
